package com.takeaway.model.net

import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query
import rx.Observable

interface TakeoutService {

    /*
    @GET("users/{user}/repos")
    Call<List<Repo>> listRepos(@Path("user") String user);

    */

    @GET("/home")
    fun getHomeData():Call<ResponseInfo>

    @GET("/login")
    fun loginByPhone(@Query("phone") phone: String):Call<ResponseInfo>


    @GET(value = "/order")
    fun getOrderList(@Query("id") userId: String): Call<ResponseInfo>


    // 组合rxjava
    @GET(value = "/order")
    fun getOrderListByRxJava(@Query("id") userId: String): Observable<ResponseInfo>
}